package com.xzh.wms.controller;

import cn.hutool.json.JSONArray;
import com.xzh.wms.dto.FileInfoDTO;
import com.xzh.wms.dto.UploadDTO;
import com.xzh.wms.service.EnumService;
import com.xzh.wms.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author : heimi
 * @date : 2024-11-10
 */
@RestController
@RequestMapping("/api/upload")
public class UploadController {

    @Autowired
    private UploadService uploadService;

     @PostMapping()
     public String upload(@RequestBody UploadDTO uploadDTO)  {
        return uploadService.upload(uploadDTO);
    }

     @GetMapping
     public List<FileInfoDTO> select( )  {
        return uploadService.select();
    }
}